// src/main/java/com/mcp_life/mcp_life/TestController.java
package com.mcp_life.module.testmoudle;

import com.mcp_life.common.context.UserContextHolder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {

    @GetMapping("/protected")
    public String protectedEndpoint() {
        String userId = UserContextHolder.getUserId();
        return "Hello, your user ID is: " + userId;
    }
}
